package com.cz.video.website.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cz.video.common.core.mapper.BaseMapperPlus;
import com.cz.video.website.domain.WebsiteHistory;
import com.cz.video.website.domain.vo.WebsiteHistoryVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 历史记录 Mapper 接口
 * </p>
 *
 * @author
 * @since 2023-07-09
 */
public interface WebsiteHistoryMapper extends BaseMapperPlus<WebsiteHistoryMapper,WebsiteHistory, WebsiteHistoryVo> {
    /**
     * 根据条件分页查询历史记录数据
     *
     * @param queryWrapper 查询条件
     * @return 课程场景数据分页信息
     */
    Page<WebsiteHistoryVo> selectPageList(@Param("page") Page<WebsiteHistory> page,
                                        @Param(Constants.WRAPPER) Wrapper<WebsiteHistory> queryWrapper);

    /**
     * 根据条件查询历史记录数据
     *
     * @param queryWrapper 查询条件
     * @return 历史记录数据集合信息
     */
    List<WebsiteHistoryVo> selectWebsiteHistoryList(@Param(Constants.WRAPPER) Wrapper<WebsiteHistory> queryWrapper);

    /**
     * 插入或更新时间
     * @param history
     * @return
     */
    boolean insertOrUpdateTime(@Param("history") WebsiteHistory history);

    /**
     * 批量插入或更新时间
     * @param historyList
     * @return
     */
    boolean insertOrUpdateTimeBatch(@Param("historyList") List<WebsiteHistory> historyList);
}
